<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script>
		// 迭代对象，可以用for of遍历对象是迭代对象
		// String 字符串 Array数组  Set集合 Map图
		// keys键结果 values值的集合 entries键与值的集合
		var s1 = new Set([1,5,7,"name","mumu"]);
		for(var v of s1){
			console.log(v);
		}
		for(var key of s1.keys()){
			console.log(key);
		}
		for(var key of s1.values()){
			console.log(key);
		}
		// 
		var arr = ["red","blue","yellow"]
		for(var key of arr.keys()){
			console.log(key);
		}
		for(var [k,v] of arr.entries()){
			console.log(k,v)
		}
		</script>
	</body>
</html>
